.class public Lframent/SearchInShopGoodsAdapter;
.super Landroid/widget/BaseAdapter;
.source "SearchInShopGoodsAdapter.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lframent/SearchInShopGoodsAdapter$MyHolder;
    }
.end annotation


# instance fields
.field private context:Landroid/content/Context;

.field private goodsBeans:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List",
            "<",
            "Lbean/GoodsBean;",
            ">;"
        }
    .end annotation
.end field

.field private inflater:Landroid/view/LayoutInflater;

.field private loader:Lcom/nostra13/universalimageloader/core/ImageLoader;

.field private m:Lmyapp/MyApp;


# direct methods
.method public constructor <init>(Landroid/content/Context;Ljava/util/List;)V
    .locals 1
    .param p1, "context"    # Landroid/content/Context;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/content/Context;",
            "Ljava/util/List",
            "<",
            "Lbean/GoodsBean;",
            ">;)V"
        }
    .end annotation

    .prologue
    .line 31
    .local p2, "goodsBeans":Ljava/util/List;, "Ljava/util/List<Lbean/GoodsBean;>;"
    invoke-direct {p0}, Landroid/widget/BaseAdapter;-><init>()V

    .line 32
    iput-object p1, p0, Lframent/SearchInShopGoodsAdapter;->context:Landroid/content/Context;

    .line 33
    iput-object p2, p0, Lframent/SearchInShopGoodsAdapter;->goodsBeans:Ljava/util/List;

    .line 34
    invoke-virtual {p1}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;

    move-result-object v0

    check-cast v0, Lmyapp/MyApp;

    iput-object v0, p0, Lframent/SearchInShopGoodsAdapter;->m:Lmyapp/MyApp;

    .line 35
    iget-object v0, p0, Lframent/SearchInShopGoodsAdapter;->m:Lmyapp/MyApp;

    invoke-virtual {v0}, Lmyapp/MyApp;->getInstance()Lcom/nostra13/universalimageloader/core/ImageLoader;

    move-result-object v0

    iput-object v0, p0, Lframent/SearchInShopGoodsAdapter;->loader:Lcom/nostra13/universalimageloader/core/ImageLoader;

    .line 36
    invoke-static {p1}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object v0

    iput-object v0, p0, Lframent/SearchInShopGoodsAdapter;->inflater:Landroid/view/LayoutInflater;

    .line 38
    return-void
.end method

.method static synthetic access$0(Lframent/SearchInShopGoodsAdapter;)Ljava/util/List;
    .locals 1

    .prologue
    .line 29
    iget-object v0, p0, Lframent/SearchInShopGoodsAdapter;->goodsBeans:Ljava/util/List;

    return-object v0
.end method

.method static synthetic access$1(Lframent/SearchInShopGoodsAdapter;)Landroid/content/Context;
    .locals 1

    .prologue
    .line 25
    iget-object v0, p0, Lframent/SearchInShopGoodsAdapter;->context:Landroid/content/Context;

    return-object v0
.end method


# virtual methods
.method public getCount()I
    .locals 1

    .prologue
    .line 44
    iget-object v0, p0, Lframent/SearchInShopGoodsAdapter;->goodsBeans:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    return v0
.end method

.method public getItem(I)Ljava/lang/Object;
    .locals 1
    .param p1, "arg0"    # I

    .prologue
    .line 50
    iget-object v0, p0, Lframent/SearchInShopGoodsAdapter;->goodsBeans:Ljava/util/List;

    invoke-interface {v0, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    return-object v0
.end method

.method public getItemId(I)J
    .locals 2
    .param p1, "arg0"    # I

    .prologue
    .line 56
    int-to-long v0, p1

    return-wide v0
.end method

.method public getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
    .locals 6
    .param p1, "arg0"    # I
    .param p2, "arg1"    # Landroid/view/View;
    .param p3, "arg2"    # Landroid/view/ViewGroup;

    .prologue
    .line 62
    if-nez p2, :cond_0

    .line 64
    new-instance v1, Lframent/SearchInShopGoodsAdapter$MyHolder;

    invoke-direct {v1}, Lframent/SearchInShopGoodsAdapter$MyHolder;-><init>()V

    .line 65
    .local v1, "holder":Lframent/SearchInShopGoodsAdapter$MyHolder;
    iget-object v2, p0, Lframent/SearchInShopGoodsAdapter;->inflater:Landroid/view/LayoutInflater;

    const v3, 0x7f030093

    const/4 v4, 0x0

    invoke-virtual {v2, v3, v4}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object p2

    .line 66
    const v2, 0x7f0c02e2

    invoke-virtual {p2, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/ImageView;

    iput-object v2, v1, Lframent/SearchInShopGoodsAdapter$MyHolder;->goodimg:Landroid/widget/ImageView;

    .line 67
    const v2, 0x7f0c0061

    invoke-virtual {p2, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/TextView;

    iput-object v2, v1, Lframent/SearchInShopGoodsAdapter$MyHolder;->name:Landroid/widget/TextView;

    .line 68
    const v2, 0x7f0c02e3

    invoke-virtual {p2, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/TextView;

    iput-object v2, v1, Lframent/SearchInShopGoodsAdapter$MyHolder;->sellcount:Landroid/widget/TextView;

    .line 69
    const v2, 0x7f0c0294

    invoke-virtual {p2, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/TextView;

    iput-object v2, v1, Lframent/SearchInShopGoodsAdapter$MyHolder;->cost:Landroid/widget/TextView;

    .line 70
    const v2, 0x7f0c018d

    invoke-virtual {p2, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/TextView;

    iput-object v2, v1, Lframent/SearchInShopGoodsAdapter$MyHolder;->goodattr:Landroid/widget/TextView;

    .line 71
    const v2, 0x7f0c0271

    invoke-virtual {p2, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/TextView;

    iput-object v2, v1, Lframent/SearchInShopGoodsAdapter$MyHolder;->goodsout:Landroid/widget/TextView;

    .line 73
    invoke-virtual {p2, v1}, Landroid/view/View;->setTag(Ljava/lang/Object;)V

    .line 78
    :goto_0
    iget-object v2, p0, Lframent/SearchInShopGoodsAdapter;->goodsBeans:Ljava/util/List;

    invoke-interface {v2, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lbean/GoodsBean;

    .line 80
    .local v0, "bean":Lbean/GoodsBean;
    iget-object v2, v1, Lframent/SearchInShopGoodsAdapter$MyHolder;->name:Landroid/widget/TextView;

    invoke-virtual {v0}, Lbean/GoodsBean;->getname()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 81
    iget-object v2, p0, Lframent/SearchInShopGoodsAdapter;->loader:Lcom/nostra13/universalimageloader/core/ImageLoader;

    new-instance v3, Ljava/lang/StringBuilder;

    iget-object v4, p0, Lframent/SearchInShopGoodsAdapter;->m:Lmyapp/MyApp;

    invoke-virtual {v4}, Lmyapp/MyApp;->getWebConfig()Ljava/lang/String;

    move-result-object v4

    invoke-static {v4}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v4

    invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0}, Lbean/GoodsBean;->getimg()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    iget-object v4, v1, Lframent/SearchInShopGoodsAdapter$MyHolder;->goodimg:Landroid/widget/ImageView;

    invoke-static {}, Lmyapp/MyApp;->getDefaultOptions()Lcom/nostra13/universalimageloader/core/DisplayImageOptions;

    move-result-object v5

    invoke-virtual {v2, v3, v4, v5}, Lcom/nostra13/universalimageloader/core/ImageLoader;->displayImage(Ljava/lang/String;Landroid/widget/ImageView;Lcom/nostra13/universalimageloader/core/DisplayImageOptions;)V

    .line 83
    iget-object v2, v1, Lframent/SearchInShopGoodsAdapter$MyHolder;->cost:Landroid/widget/TextView;

    new-instance v3, Ljava/lang/StringBuilder;

    const-string v4, "\uffe5"

    invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0}, Lbean/GoodsBean;->getcost()F

    move-result v4

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(F)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 84
    invoke-virtual {v0}, Lbean/GoodsBean;->getAttr()Ljava/lang/String;

    move-result-object v2

    const-string v3, ""

    invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-nez v2, :cond_1

    .line 85
    iget-object v2, v1, Lframent/SearchInShopGoodsAdapter$MyHolder;->goodattr:Landroid/widget/TextView;

    new-instance v3, Ljava/lang/StringBuilder;

    const-string v4, "/"

    invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0}, Lbean/GoodsBean;->getAttr()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 86
    iget-object v2, v1, Lframent/SearchInShopGoodsAdapter$MyHolder;->sellcount:Landroid/widget/TextView;

    new-instance v3, Ljava/lang/StringBuilder;

    const-string v4, "\u5df2\u552e"

    invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0}, Lbean/GoodsBean;->getsellcount()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 93
    :goto_1
    invoke-virtual {v0}, Lbean/GoodsBean;->getcounts()Ljava/lang/String;

    move-result-object v2

    const-string v3, "0"

    invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-eqz v2, :cond_2

    .line 94
    iget-object v2, v1, Lframent/SearchInShopGoodsAdapter$MyHolder;->goodsout:Landroid/widget/TextView;

    const/4 v3, 0x0

    invoke-virtual {v2, v3}, Landroid/widget/TextView;->setVisibility(I)V

    .line 99
    :goto_2
    invoke-virtual {p2, p1}, Landroid/view/View;->setId(I)V

    .line 100
    new-instance v2, Lframent/SearchInShopGoodsAdapter$1;

    invoke-direct {v2, p0}, Lframent/SearchInShopGoodsAdapter$1;-><init>(Lframent/SearchInShopGoodsAdapter;)V

    invoke-virtual {p2, v2}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 124
    return-object p2

    .line 75
    .end local v0    # "bean":Lbean/GoodsBean;
    .end local v1    # "holder":Lframent/SearchInShopGoodsAdapter$MyHolder;
    :cond_0
    invoke-virtual {p2}, Landroid/view/View;->getTag()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lframent/SearchInShopGoodsAdapter$MyHolder;

    .restart local v1    # "holder":Lframent/SearchInShopGoodsAdapter$MyHolder;
    goto/16 :goto_0

    .line 88
    .restart local v0    # "bean":Lbean/GoodsBean;
    :cond_1
    iget-object v2, v1, Lframent/SearchInShopGoodsAdapter$MyHolder;->goodattr:Landroid/widget/TextView;

    const-string v3, "/\u4efd"

    invoke-virtual {v2, v3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 89
    iget-object v2, v1, Lframent/SearchInShopGoodsAdapter$MyHolder;->sellcount:Landroid/widget/TextView;

    new-instance v3, Ljava/lang/StringBuilder;

    const-string v4, "\u5df2\u552e"

    invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0}, Lbean/GoodsBean;->getsellcount()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    goto :goto_1

    .line 96
    :cond_2
    iget-object v2, v1, Lframent/SearchInShopGoodsAdapter$MyHolder;->goodsout:Landroid/widget/TextView;

    const/16 v3, 0x8

    invoke-virtual {v2, v3}, Landroid/widget/TextView;->setVisibility(I)V

    goto :goto_2
.end method
